<!DOCTYPE html>
<html lang="en" style="background: #fff">
<include file="public/header" title="申请提现" body="g4"/>

<link rel="stylesheet" type="text/css" href="__STATIC__/layui/css/layui.css"/>
<script src="__STATIC__/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
<style>
    /*登陆*/
    .denglu {
        width: 100%;
        margin: auto;
        overflow: hidden;
    }
    .Login {
        width: 90%;
        margin: auto;
        overflow: hidden;
        padding-top: 0.427rem;
    }
    .Login dl {
        width: 100%;
        overflow: hidden;
    }
    .Login dl dt {
        float: left;
        font-size: .8rem;
        line-height: 1.853rem;
        color: #666;
    }
    .Login dl dd {
        float: left;
        height: 1.999rem;
    }
    .Login dl dd input {
        border: 1px solid #DFDFDF;
        height:  1.853rem;
        line-height:  1.853rem;
        width: 9rem;
        padding-left: 5px;
        -webkit-appearance: none;
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        flex: 1;
        border-radius: 0;
        -webkit-rtl-ordering: logical;
        -webkit-user-select: text;
        cursor: auto;
        background-color: white;
        font-size:  .8rem;
    }
    .field {
        padding: 5px 0;
    }
    .btn_big1 {
        display: block;
        margin: auto;
        background: #FF2233;
        font-size: 1.2rem;
        line-height: 1.8rem;
        border: 0px;
        color: #FFF;
        width: 8rem;
        height: 2rem;
        margin: auto;
        margin-top: .8rem;
        margin-bottom: .2rem;
        border-radius: 5px;
    }

    .ng-foot .ng-link-area a {
        color: #5790bb;
        font-size: 14px;
    }
    .ng-foot .ng-link-area span {
        height: 10px;
    }

    .log_reg_box .tips span {
        color: rgb(0, 153, 51);
    }

</style>
<body>
<div class="denglu" style="margin: auto ;">
    <form action="" method="post">
        <div class="Login">
            <dl >
                <dt>提现金额：</dt>
                <dd><input type="number" name="money" id="money" placeholder="{$reamin_money}" value="{$reamin_money}" max="{$reamin_money}" /></dd>
            </dl>
            <div class="field submit-btn">
                <input type="hidden" name="id" value="{$id}"/>
                <input type="button" class="btn_big1" onClick="checkSubmit()" value="提现" />
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">

    function checkSubmit()
    {
        var money = $.trim($('#money').val());
        if(money>{$reamin_money}){
            showErrorMsg('提现金额超过可提现金额');
            return false;
        }
        $.ajax({
            type : 'post',
            url :  "tixian",
            data : {money:money,id:{$id}},
            dataType : 'json',
            success : function(res){
                if(res.status == 1){
                    showErrorMsg(res.msg);
                    layer.close();
                    // setTimeout(function () {
                    //     window.location.href = "{:url('@index/user/index')}";
                    // }, 1200);
                }else{
                    showErrorMsg(res.msg);
                }
            }
        })
    }

    function showErrorMsg(msg){
        layer.msg(msg);
    }

</script>
</body>
</html>